using System;
using System.Web;
using System.Drawing;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WroxControls 
{
   public class MyLabel : WebControl
   {
      string _text;

   	public MyLabel() : base ("H1")
		{
		}

      public string Text
      {
         get{ return _text; }
         set{ _text = value; }  
      }

      protected override void OnInit(EventArgs e)
      {
         if ( _text == null )
             _text = "Here is some default text";
      }

      protected override void RenderContents(HtmlTextWriter writer) 
      { 
            writer.Write( _text );
      }

   }
};
